package com.kangye.enterprise.frontdesk.controller;

import com.kangye.enterprise.frontdesk.entity.Department;
import com.kangye.enterprise.frontdesk.service.DepartmentService;
import com.kangye.enterprise.frontdesk.util.ViewJsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: enterprise
 * @description:部门接口
 * @author: 索腾龙
 * @create: 2021-05-31 13:57
 **/
@RestController
@CrossOrigin
@RequestMapping("/department")
public class DepartmentController {
    //注入Service
    @Autowired
    private DepartmentService departmentService;
    //政策即时推送(未关注)  全部部门列表(索腾龙写)
    @RequestMapping("/selDepartment")
    public ViewJsonObject<Department> selDepartment(){
        return departmentService.selDepartment();
    }
}